home *** CD-ROM | disk | FTP | other *** search
- on initLesson
- setRollName(EMPTY)
- set the visible of sprite 48 to 0
- InitSnakelogic()
- RestoreHilites()
- Set_BACKSprite(47)
- Set_NEXTSprite(46)
- Set_HelpSprite(45)
- Set_SoundSprite(44)
- Set_NOTEPADSprite(43)
- Set_GLOSSARYSprite(42)
- set_MarkSprite(2)
- Set_NavigatorHL(5)
- Set_MainSprite(6)
- Set_IndexSprite(7)
- Set_FindSprite(9)
- Set_TagWDSprite(8)
- repeat with i = 42 to 47
- set the immediate of sprite i to 1
- set the puppet of sprite i to 1
- end repeat
- set the puppet of sprite get_NavigatorHL() to 1
- set the puppet of sprite Get_MarkSprite() to 1
- set the mouseDownScript to "CheckOpenWindow"
- end
-
- on CheckForTagWd
- global TagWD
- if objectp(TagWD) then
- set the cursor of sprite 48 to [400, 401]
- end if
- end
-
- on PlaySound theSnd
- if Get_PlayDub() then
- sound playFile 2, theSnd
- end if
- end
-
- on GoMain
- SaveSeenScreens()
- go(1, "NC_MM010.GEO")
- end
-
- on GoFind
- end
-
- on GoIndex
- end
-
- on GoTags
- global TagWD
- if objectp(TagWD) then
- forget(TagWD)
- end if
- set the cursor of sprite 48 to [400, 401]
- set TagWD to window "NC_TAGS.GEO"
- set the rect of TagWD to rect(the stageLeft + 220, the stageTop + 116, the stageLeft + 444, the stageTop + 361)
- set the titleVisible of TagWD to 0
- set the modal of TagWD to 1
- tell TagWD
- PlaceMySlider()
- end tell
- open(TagWD)
- end
-
- on CloseTagWindow
- global TagWD
- if objectp(TagWD) then
- forget(TagWD)
- end if
- set the cursor of sprite 48 to 0
- end
-
- on GoTagMovie
- go("Init" & Get_ScreenSubject(), Get_TagMovie())
- end
-
- on Set_TagMovie theMovie
- global TagMovie
- set TagMovie to theMovie
- end
-
- on Get_TagMovie
- global TagMovie
- return TagMovie
- end
-
- on MarkScreen toMark
- set the castNum of sprite Get_MarkSprite() to the number of cast ("V_" & toMark)
- updateStage()
- end
-
- on HandleSound
- global volumeWindow
- if objectp(volumeWindow) then
- forget(volumeWindow)
- end if
- EnableBtn("SOUND", get_SOUNDSprite())
- set volumeWindow to window "NC_VOL.GEO"
- set the rect of volumeWindow to rect(the stageLeft + 66, the stageTop + 374, the stageLeft + 195, the stageTop + 422)
- set the titleVisible of volumeWindow to 0
- tell volumeWindow
- RestoreSoundStatus()
- end tell
- open(volumeWindow)
- end
-
- on handleQuit
- global QuitWindow, CDfilePath, PCDEL
- cursor(4)
- if objectp(QuitWindow) then
- forget(QuitWindow)
- end if
- set the cursor of sprite 48 to [400, 401]
- set QuitWindow to window (CDfilePath & "WDS" & PCDEL & "NC_QUIT.GEO")
- set the rect of QuitWindow to rect(the stageLeft + 162, the stageTop + 122, the stageLeft + 478, the stageTop + 358)
- set the titleVisible of QuitWindow to 0
- set the modal of QuitWindow to 1
- open(QuitWindow)
- end
-
- on closeQuitWindow
- global QuitWindow
- updateStage()
- set the visible of sprite 48 to 0
- set the cursor of sprite 48 to 0
- forget(QuitWindow)
- continue()
- end
-
- on leaveApplication
- global QuitWindow, UsersData, TheBackWindow
- forget(QuitWindow)
- if the machineType <> 256 then
- end if
- quit()
- end
-
- on handleHELP
- EnableBtn("HELP", get_HELPSprite())
- end
-
- on HandleNEXT
- GoNext()
- EnableBtn("NEXT", get_NEXTSprite())
- end
-
- on HandleBACK
- EnableBtn("BACK", get_BACKSprite())
- Set_NEXT(1)
- sound stop 2
- setEmptyCursor()
- go("start")
- end
-
- on HandleGLOSSARY
- global DicWindow
- EnableBtn("GLOSSARY", Get_GLOSSARYSprite())
- set the cursor of sprite 48 to [400, 401]
- open(DicWindow)
- tell DicWindow
- go(2)
- end tell
- end
-
- on closeGLOSSARYwindow
- set the cursor of sprite 48 to 0
- end
-
- on closeNotePadWindow
- set the cursor of sprite 48 to 0
- end
-
- on HandleNOTEPAD
- global NoteBookWindow
- EnableBtn("NOTEPAD", Get_NOTEPADSprite())
- set the cursor of sprite 48 to [400, 401]
- if objectp(NoteBookWindow) then
- forget(NoteBookWindow)
- end if
- set NoteBookWindow to window "NC_PAD.GEO"
- set the rect of NoteBookWindow to rect(the stageLeft + 7, the stageTop + 247, the stageLeft + 209, the stageTop + 419)
- set NBRect to the rect of NoteBookWindow
- set x1 to getAt(NBRect, 1)
- set y1 to getAt(NBRect, 2)
- set x2 to getAt(NBRect, 3)
- set y2 to getAt(NBRect, 4)
- set the fileName of NoteBookWindow to "NC_PAD.GEO"
- set the modal of NoteBookWindow to 1
- set the windowType of NoteBookWindow to 2
- set the titleVisible of window "NoteBook" to 0
- open(NoteBookWindow)
- end
-
- on createNoteBook
- global NBPrintWindow
- if objectp(NBPrintWindow) then
- forget(NBPrintWindow)
- end if
- set NBPrintWindow to window "NC_PRINT.GEO"
- set StageRect to the rect of the stage
- set x1 to getAt(StageRect, 1)
- set y1 to getAt(StageRect, 2)
- set x2 to getAt(StageRect, 3)
- set y2 to getAt(StageRect, 4)
- set the rect of NBPrintWindow to rect(x1, y1, x1 + 640, y1 + 480)
- set NBRect to the rect of NBPrintWindow
- set the fileName of NBPrintWindow to "Auto Page SetUp"
- set the windowType of NBPrintWindow to 2
- open(NBPrintWindow)
- end
-
- on keyDown
- if the commandDown and ((the key = "q") or (the key = ".")) then
- handleQuit()
- else
- if (the keyCode = 76) or (the keyCode = 36) then
- if get_CurrLogic() = "nameStroke" then
- OK_NewName()
- else
- if get_CurrLogic() = "nameScroll" then
- OK_NameScroll()
- end if
- end if
- else
- pass()
- end if
- end if
- end
-
- on CheckOpenWindow
- global volumeWindow
- if objectp(volumeWindow) then
- forget(volumeWindow)
- end if
- end
-
- on CheckRollOver
- if rollOver(get_IndexSprite()) then
- set the castNum of sprite get_NavigatorHL() to the number of cast "Index-HL"
- set Hloc to the locH of sprite get_IndexSprite()
- set Vloc to the locV of sprite get_IndexSprite()
- else
- if rollOver(get_FindSprite()) then
- set the castNum of sprite get_NavigatorHL() to the number of cast "Find-HL"
- set Hloc to the locH of sprite get_FindSprite()
- set Vloc to the locV of sprite get_FindSprite()
- else
- if rollOver(Get_TagWdSprite()) then
- set the castNum of sprite get_NavigatorHL() to the number of cast "TagWD-HL"
- set Hloc to the locH of sprite Get_TagWdSprite()
- set Vloc to the locV of sprite Get_TagWdSprite()
- else
- set Hloc to EMPTY
- end if
- end if
- end if
- if Hloc <> EMPTY then
- set the locH of sprite get_NavigatorHL() to Hloc
- set the locV of sprite get_NavigatorHL() to Vloc
- set the visible of sprite get_NavigatorHL() to 1
- updateStage()
- else
- set the visible of sprite get_NavigatorHL() to 0
- updateStage()
- end if
- end
-
- on setDefaultCursor
- set cursorList to getCursorList()
- set counter to count(cursorList)
- repeat with i = 1 to counter
- set currItem to getAt(cursorList, i)
- if currItem <> 0 then
- set CursorCastNum to getCursor(currItem)
- set the cursor of sprite i to [CursorCastNum, CursorCastNum + 1]
- end if
- end repeat
- end
-
- on UpdateCursors theSp, theCursor
- global cursorList
- setAt(cursorList, theSp, theCursor)
- if theCursor = 0 then
- set the cursor of sprite theSp to theCursor
- else
- set CursorCastNum to getCursor(theCursor)
- set the cursor of sprite theSp to [CursorCastNum, CursorCastNum + 1]
- end if
- end
-
- on setEmptyCursor
- set cursorList to getCursorList()
- set counter to count(cursorList)
- repeat with i = 1 to counter
- set currItem to getAt(cursorList, i)
- if currItem <> 0 then
- set the cursor of sprite i to 0
- setAt(cursorList, i, 0)
- end if
- end repeat
- end
-
- on setCursorTool int
- global CursorTool
- set CursorTool to int
- end
-
- on initCursorCastNum
- global CursorCastNum
- set CursorCastNum to "400,402,404,406"
- end
-
- on getCursor cursorNum
- global CursorCastNum
- return integer(item cursorNum of CursorCastNum)
- end
-
- on initCursorList list
- global cursorList, NumOfUsers
- if list = 1 then
- set cursorList to [0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- else
- if list = 2 then
- setEmptyCursor()
- set cursorList to [0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- else
- if list = 3 then
- setEmptyCursor()
- set cursorList to [0, 0, 3, 3, 0, 0, 3, 3, 3, 0, 3, 3, 3, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- end if
- end if
- end if
- setDefaultCursor()
- if (NumOfUsers = 0) or (field "complete" = EMPTY) then
- UpdateCursors(4, 1)
- end if
- end
-
- on getCursorList
- global cursorList
- return cursorList
- end
-
- on ___BTNS_HANDLERS___
- end
-
- on switchButt spriteNum, castDown, macroName
- set flag to 0
- set SaveCast to the castNum of sprite spriteNum
- set flag to swapCast(spriteNum, SaveCast, castDown)
- repeat while the stillDown
- set flag to swapCast(spriteNum, SaveCast, castDown)
- end repeat
- if flag = 1 then
- sound stop 2
- do(macroName)
- end if
- end
-
- on swapCast spriteNum, SaveCast, castDown
- if rollOver(spriteNum) then
- set the castNum of sprite spriteNum to the number of cast castDown
- updateStage()
- return 1
- else
- set the castNum of sprite spriteNum to the number of cast SaveCast
- updateStage()
- return 0
- end if
- end
-
- on DisableBtn btnName, btnSprite
- set the castNum of sprite btnSprite to the number of cast (btnName & "_F")
- end
-
- on EnableBtn btnName, btnSprite
- set the castNum of sprite btnSprite to the number of cast btnName
- end
-
- on setRollName theName
- global RollName
- set RollName to theName
- end
-
- on getRollName
- global RollName
- return RollName
- end
-
- on Set_NOTEPADSprite theSp
- global NOTEPADSprite
- set NOTEPADSprite to theSp
- end
-
- on Get_NOTEPADSprite
- global NOTEPADSprite
- return NOTEPADSprite
- end
-
- on Set_GLOSSARYSprite theSp
- global GLOSSARYSprite
- set GLOSSARYSprite to theSp
- end
-
- on Get_GLOSSARYSprite
- global GLOSSARYSprite
- return GLOSSARYSprite
- end
-
- on Set_SoundSprite theSp
- global SoundSprite
- set SoundSprite to theSp
- end
-
- on get_SOUNDSprite
- global SoundSprite
- return SoundSprite
- end
-
- on Set_HelpSprite theSp
- global HelpSprite
- set HelpSprite to theSp
- end
-
- on get_HELPSprite
- global HelpSprite
- return HelpSprite
- end
-
- on Set_NEXTSprite theSp
- global NEXTSprite
- set NEXTSprite to theSp
- end
-
- on get_NEXTSprite
- global NEXTSprite
- return NEXTSprite
- end
-
- on Set_BACKSprite theSp
- global BACKSprite
- set BACKSprite to theSp
- end
-
- on get_BACKSprite
- global BACKSprite
- return BACKSprite
- end
-
- on Set_NavigatorHL theSp
- global NavigatorHL
- set NavigatorHL to theSp
- end
-
- on get_NavigatorHL
- global NavigatorHL
- return NavigatorHL
- end
-
- on Set_IndexSprite theSp
- global IndexSprite
- set IndexSprite to theSp
- end
-
- on get_IndexSprite
- global IndexSprite
- return IndexSprite
- end
-
- on Set_TagWDSprite theSp
- global TagWdSprite
- set TagWdSprite to theSp
- end
-
- on Get_TagWdSprite
- global TagWdSprite
- return TagWdSprite
- end
-
- on Set_FindSprite theSp
- global FindSprite
- set FindSprite to theSp
- end
-
- on get_FindSprite
- global FindSprite
- return FindSprite
- end
-
- on Set_MainSprite theSp
- global MainSprite
- set MainSprite to theSp
- end
-
- on get_MainSprite
- global MainSprite
- return MainSprite
- end
-
- on Set_NEXT theSp
- global next
- set next to theSp
- end
-
- on Get_NEXT
- global next
- return next
- end
-
- on Set_PlayDub theMode
- global PlayDub
- set PlayDub to theMode
- end
-
- on Get_PlayDub
- global PlayDub
- return PlayDub
- end
-
- on Set_ScreenSubject theNum
- global ScreenSubject
- set ScreenSubject to theNum
- end
-
- on Get_ScreenSubject
- global ScreenSubject
- return ScreenSubject
- end
-
- on set_MarkSprite theNum
- global MarkSprite
- set MarkSprite to theNum
- end
-
- on Get_MarkSprite
- global MarkSprite
- return MarkSprite
- end
-